@tailwind base;
@tailwind components;
@tailwind utilities;

.vp-code span {
  color: var(--shiki-dark, inherit);
}

:root {
  --c-brand: #3e63dd;
  --c-brand-light: #5c73e7;
}

body {
  @apply bg-neutral-900;
}

nav img {
  vertical-align: middle;
}

p img {
  margin: 0px auto;
}

.prose hr {
  border-top: 1px solid #e5e7eb;
}

.link {
  color: var(--c-brand);
}

.link:hover {
  color: var(--c-brand-light);
}

.header-anchor {
  display: none;
}

h3 .header-anchor {
  display: inline-block;
  position: absolute;
  left: -0.7em;
  text-decoration: none;
  color: var(--c-brand);
}

h3 .header-anchor:before {
  content: '#';
}

/**
 * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML.
 * Based on https://github.com/chriskempson/tomorrow-theme
 *
 * @author Rose Pritchard
 */
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #999;
}

.token.punctuation {
  color: #ccc;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
  color: #e2777a;
}

.token.function-name {
  color: #6196cc;
}

.token.boolean,
.token.number,
.token.function {
  color: #f08d49;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
  color: #f8c555;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
  color: #cc99cd;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
  color: #7ec699;
}

.token.operator,
.token.entity,
.token.url {
  color: #67cdcc;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

.token.inserted {
  color: #67cdcc;
}

button.copy {
  display: none;
}

span.lang {
  position: absolute;
  right: 0.5em;
  font-size: 0.75em;
  color: #999;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

.custom-block {
  margin: 28px 0;
  padding: 0 24px 2px;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: rgba(255, 255, 245, 0.86);
  background-color: rgba(101, 117, 133, .16);
}

.custom-block.details {
  padding: 16px 16px 8px;
}

.custom-block.details summary {
  margin: 0 0 8px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.custom-block .custom-block-title {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: bold;
}

.custom-block.tip {
  border: 1px solid #42b883;
}
.custom-block.tip:before {
  color: #42b883;
}

.prose
  :where(:not(pre) > code):not(
    :where([class~='not-prose'], [class~='not-prose'] *)
  ) {
  color: #0a3760;
  padding: 0.25em 0.4em;
  border-radius: 4px;
  background-color: #eee;
}

.prose
  :where(code):not(
    :where([class~='not-prose'], [class~='not-prose'] *)
  )::before {
  content: '' !important;
}

.prose
  :where(code):not(
    :where([class~='not-prose'], [class~='not-prose'] *)
  )::after {
  content: '' !important;
}

@media (prefers-color-scheme: dark) {
  .prose
    :where(:not(pre) > code):not(
      :where([class~='not-prose'], [class~='not-prose'] *)
    ) {
    color: #d1e9ff;
    background-color: #3c3a5b;
  }
}

strong {
  position: relative;
  background-color: var(--c-brand);
  padding: 0.1em 0.2em;
  font-size: 0.9em;
  border-radius: 7.5px;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
}

.popup iframe {
  width: 80vw;
  height: 80vh;
}

.popup button {
  background-color: #fff;
  position: absolute;
  right: 0;
  top: 0;
} 